using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace Barrage.GUI.Elements
{
    /// <summary>
    /// A GUISelector that can be placed inside a Button list
    /// </summary>
    public class GUIButtonListSelector : GUISelector, GUIButtonListElement
    {
        /// <summary>
        /// Item constructor
        /// </summary>
        /// <param name="layout">Layout that will hold this item</param>
        /// <param name="template">Template that will be used to render this item</param>
        /// <param name="xn">Xml Node that holds attribute values of this item</param>
        public GUIButtonListSelector(GUILayout layout, string template, XmlNode xn)
            : base(layout, template, xn)
        {
            
        }

        /// <summary>
        /// This item is selectable, so IsSelectable always return true
        /// </summary>
        public bool IsSelectable
        {
            get { return true; }
        }

        /// <summary>
        /// Cast to GUISelectableElement
        /// </summary>
        public GUISelectableElement SelectableElement
        {
            get { return (GUISelectableElement)this; }
        }

        /// <summary>
        /// Cast to Element
        /// </summary>
        public GUIElement Element
        {
            get { return (GUIElement)this; }
        }
    }
}
